import os

flag = open(r'D:\python-station\base-study\flag.txt', 'rb').read()


def get_key(n):
    keys = [os.urandom(6) for i in range(n)]
    return keys


def encrypt(keys, flag):
    for key in keys:
        flag = bytes([p ^ q for p, q in zip(flag, key * (len(flag) + 6 // 6))])
    return flag


keys = get_key(2024)
print(encrypt(keys, flag).hex())

# 7fcd6961ca322e97383088697b8c3c3ed33634903963d77d21c76c629c322dc03160d23428c53867812d


a = '7fcd6961ca322e97383088697b8c3c3ed33634903963d77d21c76c629c322dc03160d23428c53867812d'
